import java.util.Arrays;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: dell
 * Date: 2023-11-21
 * Time: 20:32
 */

public class main7 {
    public static final double PingArray(int[] arr,int a,int i ){
        return i*1.0/a;
    }
    public static final int Sum(int[] arr,int a){
        int sum=0;
        for (int n=0;n<a;n++){
            sum+=arr[n];
        }
        return sum;
    }
    public static final void twoAray(int[] arr,int a){
        for(int n=0;n<a;n++){
            arr[n]*=2;
        }
    }
    public static void printArray(int[] arr,int a) {
        for (int n = 0; n < a; n++) {
            System.out.print(arr[n] + "   ");
            if (arr[n] % 10 == 0) {
                System.out.println();
            }
        }
    }
    public static void main(String[] args) {
        int a=6;
        int[] arr=new int[a];
        for(int i=0;i<a;i++){
            arr[i]=i+1;
        }
        //twoAray(arr,a);
        printArray(arr,a);
        int x=Sum(arr,a);
        System.out.println();
        System.out.println(x);
        System.out.println(String.format("%.3f",PingArray(arr,a,x)));
        String str ="h e l l o ";
        String[] array=str.split(" ");
        System.out.println(Arrays.toString(arr));
    }
}
